var data = [
    { "ID": "Plan01", "PlanWork": "2020年9月21日办公设备采购合同", "Creater": "生产部", "CreateDate": "2021-09-09 09:00" },
    { "ID": "Plan02", "PlanWork": "2020年9月21日办公设备采购合同", "Creater": "生产部", "CreateDate": "2021-09-09 09:00" },
    { "ID": "Plan03", "PlanWork": "2020年9月21日办公设备采购合同", "Creater": "生产部", "CreateDate": "2021-09-09 09:00" },
    { "ID": "Plan04", "PlanWork": "2020年9月21日办公设备采购合同", "Creater": "生产部", "CreateDate": "2021-09-09 09:00" },
    { "ID": "Plan05", "PlanWork": "2020年9月21日办公设备采购合同", "Creater": "生产部", "CreateDate": "2021-09-09 09:00" }
];
// 用户ID
let id = getUrlParam("id");
$(function () {
    GetUserRole();
});
//获取用户权限
function GetUserRole() {
    // let thisdata = [];
    // thisdata.push(InitRole(id));
    let USERdata = InitRole(id);
    if (USERdata != null) {
        InitData();
    }
     else OpenErrmsg("../../web/errhtml/404.html");
}

function InitData() {
    $('#dg_WorkPlanList').datagrid({
        data: data
    });
}
function formaterPlanWork(value, row) {
    let str = ' <label style="color:#589BD8">'+value+'</label><br />';
    return str;
}
function formaterIndex(value, row, index) {
    return '<a href="#" style="color:#589BD8;text-decoration:none;margin-top: 20px;">' + ( parseInt(index) + 1 )+ '</a>';
}

